<template>
	<BaseSearchForm v-model:search-param="checkParam" @goBack="emit('goto-edit')" @search="search">
	</BaseSearchForm>
	<div class="tableBox">
		<MkTable :data="list" border @row-dblclick="rowDbClick">
			<MkColumn label="单号" prop="billNo" />
			<MkColumn type="BillStatus" label="单据状态" prop="billStatus" />
			<MkColumn label="出库单编号" prop="bloodBank" />
			<MkColumn label="入库来源" prop="bloodStation" />
			<MkColumn label="开单时间" prop="createTime" />
		</MkTable>
		<div style="text-align: center; width: 100%;">
			<MkPagination v-model:page="checkParam.page" v-model:pageSize="checkParam.pageSize" :totalCount="total"
				@query="search" />
		</div>

	</div>
</template>

<script lang='ts' setup>

//单表List基本操作
import useListMastControls from '/@/componentsMaike/basHook/useListMastControls'
import { InvAuditStockInMaster, InvAuditStockInDetail } from '/@/api/inv/invShouGong/dto'
import { SearchStockInDate } from '/@/api/inv/invShouGong';
import { timeFormat } from '/@/utils'
/**
 * 注册
 */
const emit = defineEmits(['goto-edit'])
/**
 * 搜索
 */
const searchList = async () => {
	let listData: any[] = []
	for (let i = 0; i < 10; i++) {
		listData.push({
			id: i,
			billNo: '20220' + Math.floor(Math.random() * 10000),
			billStatus: '已保存',
			bloodBank: 'CKD20220' + Math.floor(Math.random() * 10000),
			bloodStation: "本地血站",
			createTime: timeFormat(new Date()),
		})
	}
	return {
		total: 10,
		items: listData
	}
}
const { checkParam, total, list, search } = useListMastControls(searchList);

/**
 * 双击行
 */
const rowDbClick = (row: any) => {
	emit('goto-edit', row)
}
/**
 * 暴露
 */
defineExpose({ search })

</script>

<style lang='scss' scoped></style>